.shell { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Ticker estilo bolsa de valores ---------- */
.ticker {
  overflow: hidden;
  background: var(--ink-900);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8), 0 10px 30px -18px rgba(201, 162, 74, 0.35);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  padding: 9px 0;
  animation: ticker var(--ticker-duration, 40s) linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 26px;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cream-dim);
}
.ticker__item::after { content: '◆'; margin-left: 26px; color: var(--gold-700); font-size: 8px; }
.ticker__item b { font-weight: 600; color: var(--cream); }
.ticker__value { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; font-variant-numeric: lining-nums tabular-nums; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Cabeçalho ---------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding-top: 26px;
  padding-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand__crest { width: 50px; height: 50px; color: var(--gold-400); filter: drop-shadow(0 0 12px rgba(201, 162, 74, 0.35)); }
.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0.34em;
  line-height: 1;
  padding-left: 0.34em;
}
.brand__tag { margin-top: 6px; font-size: 10.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--muted); }

.masthead__right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.clock { text-align: right; line-height: 1.25; }
.clock__time { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.06em; font-variant-numeric: lining-nums tabular-nums; }
.clock__date { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.actions { display: flex; gap: 8px; }

/* ---------- Grade principal ---------- */
main.shell { padding-bottom: 56px; display: grid; gap: 22px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1180px) {
  /* 5 indicadores: 3 em cima, 2 embaixo (a linha de baixo divide o espaço) */
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpis > .kpi { grid-column: span 2; }
  .kpis > .kpi:nth-child(n + 4) { grid-column: span 3; }
}

.footer {
  padding: 8px 20px 40px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > .kpi, .kpis > .kpi:nth-child(n + 4) { grid-column: auto; }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } /* o 5º ocupa a linha toda */
}
@media (max-width: 560px) {
  .shell { padding: 0 14px; }
  .masthead { padding-top: 18px; }
  .brand__name { font-size: 20px; }
  .brand__crest { width: 42px; height: 42px; }
  .masthead__right { width: 100%; justify-content: space-between; }
  .clock { text-align: left; }
  .kpis { gap: 10px; }
}

/* ---------- Entrada escalonada ---------- */
.rise { animation: rise 0.8s var(--ease-out) both; }
.rise[data-i="1"] { animation-delay: 90ms; }
.rise[data-i="2"] { animation-delay: 180ms; }
.rise[data-i="3"] { animation-delay: 270ms; }
.rise[data-i="4"] { animation-delay: 360ms; }
.footer__note { margin-top: 10px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .ticker__track { animation: none; }
  .rise { animation: none; }
}
