:root {
  color-scheme: light;
  --brand-blue: #075a84;
  --brand-blue-deep: #034466;
  --brand-green: #48b900;
  --brand-green-dark: #358f00;
  --surface: #ffffff;
  --surface-soft: #f3f6f8;
  --surface-raised: #ffffff;
  --ink: #12212b;
  --ink-soft: #60717d;
  --line: #dfe7eb;
  --shadow: 0 12px 32px rgba(12, 57, 79, 0.1);
  --article-size: 1.06rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  background: #dfe8ed;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(72, 185, 0, 0.1), transparent 30%),
    #dfe8ed;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(72, 185, 0, 0.38);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-blue);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--surface-soft);
  box-shadow: 0 0 60px rgba(8, 52, 73, 0.2);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: calc(67px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 17px 10px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  background: color-mix(in srgb, var(--surface), transparent 3%);
  backdrop-filter: blur(18px);
}

.brand-button {
  width: 168px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-button img {
  width: 100%;
  height: 42px;
  object-fit: contain;
  object-position: left center;
}

.brand-button .logo-dark {
  display: none;
}

.topbar-actions {
  display: flex;
  gap: 5px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:active {
  background: var(--surface-soft);
}

.icon-button svg,
.nav-button svg,
.action-button svg,
.search-input-wrap svg,
.inline-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #a9b6bd;
}

.notification-dot.is-active {
  background: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(72, 185, 0, 0.12);
}

#main-content {
  min-height: calc(100vh - 140px);
  padding-bottom: calc(92px + var(--safe-bottom));
}

.page {
  animation: none;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-strip {
  display: flex;
  padding: 18px 18px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--brand-green-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.welcome-strip h1,
.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 7vw, 1.9rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.live-badge {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 8px 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(72, 185, 0, 0.28);
  border-radius: 999px;
  background: rgba(72, 185, 0, 0.09);
  color: var(--brand-green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.live-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 5px rgba(72, 185, 0, 0.11);
  content: "";
}

.category-scroller {
  display: flex;
  padding: 4px 18px 16px;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.category-scroller::-webkit-scrollbar,
.story-rail::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 750;
  scroll-snap-align: start;
}

.category-chip.is-active,
.category-chip:hover {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: #fff;
}

.hero-card {
  position: relative;
  min-height: 276px;
  margin: 0 18px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--brand-blue-deep);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
}

.hero-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 27%, rgba(0, 24, 38, 0.86) 100%);
  content: "";
}

.hero-card > img {
  width: 100%;
  height: 100%;
  min-height: 276px;
  object-fit: cover;
  transition: transform 400ms ease;
}

.hero-card:hover > img {
  transform: scale(1.025);
}

.hero-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 24px 20px 19px;
  color: #fff;
}

.story-category {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--brand-green);
  color: #09210a;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-copy h2 {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: clamp(1.42rem, 6.4vw, 1.82rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hero-meta,
.story-meta,
.article-meta {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 620;
}

.hero-meta {
  color: rgba(255, 255, 255, 0.82);
}

.section {
  padding-top: 23px;
}

.section-header {
  display: flex;
  padding: 0 18px 13px;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  position: relative;
  margin: 0;
  padding-left: 12px;
  color: var(--ink);
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}

.section-title::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--brand-green);
  content: "";
}

.section-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-blue);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.story-rail {
  display: grid;
  grid-auto-columns: minmax(232px, 72%);
  grid-auto-flow: column;
  padding: 0 18px 4px;
  gap: 13px;
  overflow-x: auto;
  scroll-padding-left: 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rail-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
}

.rail-card img {
  width: 100%;
  height: 128px;
  object-fit: cover;
}

.rail-copy {
  padding: 12px 13px 14px;
}

.rail-copy .story-category {
  margin-bottom: 7px;
  padding: 0;
  background: transparent;
  color: var(--brand-green-dark);
}

.rail-copy h3 {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  font-size: 0.96rem;
  letter-spacing: -0.012em;
  line-height: 1.23;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-list {
  margin: 0;
  padding: 0 18px;
  list-style: none;
}

.news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  min-height: 113px;
  padding: 15px 0;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.news-item:first-child {
  padding-top: 0;
}

.news-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.news-copy .story-category {
  margin-bottom: 6px;
  padding: 0;
  background: transparent;
  color: var(--brand-green-dark);
}

.news-copy h3 {
  display: -webkit-box;
  margin: 0 0 7px;
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: -0.014em;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-item > img {
  width: 112px;
  height: 84px;
  align-self: center;
  border-radius: 12px;
  background: var(--line);
  object-fit: cover;
}

.ad-slot {
  display: grid;
  width: min(300px, calc(100% - 36px));
  height: 250px;
  margin: 24px auto 5px;
  padding: 26px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(7, 90, 132, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(7, 90, 132, 0.06), rgba(72, 185, 0, 0.09)),
    var(--surface);
  color: var(--brand-blue);
  text-align: center;
}

.ad-slot::before {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
  content: "PUBLICIDADE";
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.ad-slot strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.16rem;
}

.ad-slot small {
  display: block;
  color: var(--ink-soft);
  line-height: 1.45;
}

.page-heading {
  padding: 24px 18px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.page-heading p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.load-more {
  display: block;
  width: calc(100% - 36px);
  min-height: 49px;
  margin: 20px 18px 8px;
  border: 1px solid var(--brand-blue);
  border-radius: 13px;
  background: transparent;
  color: var(--brand-blue);
  cursor: pointer;
  font-weight: 800;
}

.load-more:disabled {
  cursor: wait;
  opacity: 0.55;
}

.empty-state,
.error-state {
  display: grid;
  min-height: 52vh;
  padding: 40px 28px;
  place-content: center;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 17px;
  place-items: center;
  border-radius: 22px;
  background: rgba(7, 90, 132, 0.09);
  color: var(--brand-blue);
  font-size: 2rem;
}

.empty-state h2,
.error-state h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.empty-state p,
.error-state p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.primary-button {
  min-height: 48px;
  margin-top: 20px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-blue);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.article-page {
  background: var(--surface);
}

.article-back {
  display: inline-flex;
  min-height: 40px;
  margin: 13px 14px 0;
  padding: 0 8px;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--brand-blue);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 800;
}

.article-back svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.article-header {
  padding: 9px 18px 19px;
}

.article-header .story-category {
  margin-bottom: 11px;
}

.article-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 8.6vw, 2.55rem);
  letter-spacing: -0.043em;
  line-height: 1.04;
}

.article-deck {
  margin: 0 0 15px;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.42;
}

.article-hero {
  width: 100%;
  max-height: 420px;
  background: var(--line);
  object-fit: cover;
}

.article-actions {
  display: flex;
  padding: 14px 18px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}

.action-button,
.inline-button {
  display: inline-flex;
  min-height: 40px;
  padding: 0 13px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.79rem;
  font-weight: 760;
}

.action-button.is-saved {
  border-color: rgba(72, 185, 0, 0.42);
  background: rgba(72, 185, 0, 0.09);
  color: var(--brand-green-dark);
}

.article-content {
  padding: 21px 18px 34px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--article-size);
  line-height: 1.72;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
  margin: 0 0 1.25em;
}

.article-content h2,
.article-content h3 {
  margin: 1.5em 0 0.55em;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.article-content h2 {
  font-size: 1.34em;
}

.article-content h3 {
  font-size: 1.16em;
}

.article-content img,
.article-content video,
.article-content iframe {
  width: calc(100% + 36px);
  max-width: calc(100% + 36px);
  height: auto;
  margin: 1.35em -18px;
}

.article-content iframe {
  min-height: 230px;
  border: 0;
}

.article-content blockquote {
  padding: 3px 0 3px 17px;
  border-left: 4px solid var(--brand-green);
  color: var(--ink-soft);
  font-size: 1.05em;
  font-style: italic;
}

.article-content figcaption {
  margin-top: -1.2em;
  color: var(--ink-soft);
  font-family: Inter, sans-serif;
  font-size: 0.72em;
  line-height: 1.4;
}

.settings-list {
  padding: 14px 18px 28px;
}

.settings-card {
  margin-bottom: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.settings-card-header {
  padding: 16px 16px 8px;
}

.settings-card-header h2 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.settings-card-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.79rem;
  line-height: 1.4;
}

.setting-row {
  display: flex;
  min-height: 58px;
  padding: 9px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
}

.setting-row:first-child {
  border-top: 0;
}

.setting-copy strong {
  display: block;
  font-size: 0.89rem;
}

.setting-copy small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #bdc8ce;
  transition: background 180ms ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.18);
  content: "";
  transition: transform 180ms ease;
}

.switch input:checked + .switch-track {
  background: var(--brand-green);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch input:disabled + .switch-track {
  cursor: wait;
  opacity: 0.6;
}

.status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(72, 185, 0, 0.25);
  border-radius: 999px;
  background: rgba(72, 185, 0, 0.09);
  color: var(--brand-green-dark);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.setting-help {
  margin: 0;
  padding: 0 16px 15px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.45;
}

.font-options {
  display: flex;
  gap: 6px;
}

.font-option {
  display: grid;
  width: 38px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 800;
}

.font-option.is-active {
  border-color: var(--brand-blue);
  background: var(--brand-blue);
  color: #fff;
}

.install-card {
  padding: 17px;
  background: linear-gradient(140deg, var(--brand-blue-deep), var(--brand-blue));
  color: #fff;
}

.install-card h2 {
  margin: 0 0 6px;
  font-size: 1.07rem;
}

.install-card p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82rem;
  line-height: 1.45;
}

.install-card .inline-button {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.app-version {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  z-index: 100;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, 480px);
  margin-inline: auto;
  min-height: calc(68px + var(--safe-bottom));
  padding: 7px 9px max(7px, var(--safe-bottom));
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: 0 -3px 14px rgba(8, 52, 73, 0.08);
}

.nav-button {
  display: flex;
  padding: 3px 2px 5px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #74848e;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 740;
}

.nav-button svg {
  width: 23px;
  height: 23px;
}

.nav-button.is-active {
  color: var(--brand-blue);
}

.nav-button.is-active svg {
  stroke-width: 2.25;
}

.back-to-top {
  position: fixed;
  z-index: 90;
  right: max(16px, calc((100vw - 480px) / 2 + 16px));
  bottom: calc(88px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}
.back-to-top[hidden] { display: none; }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.search-dialog {
  width: min(100%, 480px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: var(--surface-soft);
  color: var(--ink);
}

.search-dialog::backdrop {
  background: rgba(3, 32, 47, 0.5);
  backdrop-filter: blur(4px);
}

.search-panel {
  min-height: 100%;
}

.search-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  padding: calc(12px + var(--safe-top)) 13px 12px;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.search-input-wrap {
  display: flex;
  min-width: 0;
  height: 45px;
  padding: 0 13px;
  flex: 1;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.search-input-wrap svg {
  width: 20px;
  flex: 0 0 auto;
}

.search-input-wrap input {
  min-width: 0;
  height: 100%;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-results {
  padding-top: 18px;
}

.search-hint {
  padding: 36px 27px;
  color: var(--ink-soft);
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 100;
  bottom: calc(82px + var(--safe-bottom));
  left: 50%;
  max-width: min(88%, 410px);
  padding: 11px 16px;
  border-radius: 999px;
  background: #102833;
  color: #fff;
  box-shadow: 0 9px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.skeleton {
  overflow: hidden;
  background: #e3e9ec;
}

.skeleton::after {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.25s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.home-skeleton {
  padding: 18px;
}

.skeleton-line {
  width: 65%;
  height: 18px;
  margin-bottom: 10px;
  border-radius: 7px;
}

.skeleton-line.short {
  width: 38%;
}

.skeleton-hero {
  height: 276px;
  margin-top: 22px;
  border-radius: 22px;
}

.skeleton-row {
  height: 108px;
  margin-top: 18px;
  border-radius: 14px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --surface: #11232c;
  --surface-soft: #0b1920;
  --surface-raised: #132832;
  --ink: #f0f6f8;
  --ink-soft: #9fb0ba;
  --line: #28404b;
  --brand-green-dark: #70dc2c;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] body,
body:has([data-theme="dark"]) {
  background: #061218;
}

[data-theme="dark"] .brand-button .logo-light {
  display: none;
}

[data-theme="dark"] .brand-button .logo-dark {
  display: block;
}

[data-theme="dark"] .skeleton {
  background: #263a43;
}

@media (min-width: 540px) {
  body {
    padding: 20px 0;
  }

  .app-shell,
  .search-dialog {
    min-height: calc(100vh - 40px);
    border-radius: 26px;
  }

  .app-shell {
    overflow: clip;
  }

  .bottom-nav {
    bottom: 20px;
    border-radius: 0 0 26px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Article media and synchronized advertising */
.article-figure { margin: 0; }
.article-figure figcaption { padding: 8px 18px 10px; color: var(--ink-soft); font-size: .75rem; line-height: 1.5; background: var(--surface); }
.article-videos:empty, #article-ads:empty { display: none; }
.article-videos { padding: 18px 18px 0; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #14212b; margin: 0 0 16px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-videos video, .article-content video { width: 100%; max-height: 65vh; background: #14212b; }
.article-content img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
.article-content picture { display: block; max-width: 100%; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; }
.article-content figcaption { font: .8rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink-soft); }
.article-content figure { max-width: 100%; margin: 20px auto; }
.article-ad { margin: 24px auto; width: min(300px, calc(100% - 36px)); text-align: center; }
.article-ad > span { display: block; margin: 0 0 7px; color: var(--ink-soft); text-transform: uppercase; font-size: .6rem; letter-spacing: .1em; }
.article-ad a { display: block; overflow: hidden; border-radius: 10px; }
.article-ad img { width: 100%; height: auto; }
.content-status { padding: 8px 18px; font-size: .8rem; color: var(--ink-soft); line-height: 1.5; }
.source-link { display: block; margin: 0 18px 24px; font-size: .85rem; }
#article-update:empty { display: none; }
#article-update { margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Avoid repainting the whole article twice while its media arrives. */
.article-page { animation: none; }
.article-hero { aspect-ratio: 4 / 3; }
@media (max-width: 700px) {
  .topbar, .bottom-nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.article-deck.is-loading { min-height: 2.85em; }
.article-deck.is-loading span { display: block; height: .65em; margin: .35em 0 .55em; border-radius: 3px; background: var(--line); }
.article-deck.is-loading span:last-child { width: 72%; }
.article-deck[hidden] { display: none; }
