/* ==========================================================================
   Controle DISPA — Página inicial v4 (apresentação → banner → painéis → guia)
   ========================================================================== */

.wrap {
  padding: 4px clamp(16px, 3vw, 40px) 24px;
  max-width: 1500px;
  margin: 0 auto;
}

/* ---------- 1) Apresentação ---------- */
.hello {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin: 14px 0 26px;
}
.hello .eyebrow {
  font: 700 0.68rem var(--mono);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-l);
  min-height: 1em;
}
.hello h1 {
  margin: 8px 0 6px;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -2px;
  font-weight: 800;
}
.hello h1 em {
  font-style: normal;
  color: var(--red-l);
}
.hello .resumo {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 62ch;
}
.hello .resumo b {
  color: var(--ink);
}
.acts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.acts .btn {
  text-align: center;
  padding: 12px 18px;
}
.acts .btn[hidden] {
  display: none;
}

/* ---------- 2) Banner ---------- */
/* Em telas largas o "04 Continuar" fica na margem à esquerda do banner (home.js move o painel para cá e define --gutter);
   em telas estreitas ele continua no grid, embaixo do banner. flow-root mantém a margem do banner dentro do contêiner. */
.heroRow {
  position: relative;
  display: flow-root;
}
.heroRow > #p-continuar {
  position: absolute;
  top: 0;
  bottom: 22px;
  right: calc(100% + 18px);
  width: var(--gutter, 260px);
  display: flex;
  flex-direction: column;
}
.heroRow > #p-continuar > .in {
  flex: 1;
  min-width: 0;
}
.heroRow > [hidden] {
  display: none;
}
.heroW {
  margin-bottom: 22px;
  filter: drop-shadow(0 18px 34px var(--shadow));
}
:root:not([data-theme='light']) .heroW {
  filter: drop-shadow(0 0 1px rgba(224, 38, 47, 0.8)) drop-shadow(0 18px 40px rgba(224, 38, 47, 0.14));
}
.hero {
  --c: 30px;
  container-type: inline-size;
  position: relative;
  background: #f6f6f7;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
/* width:100% é obrigatório: sem ele o max-height encolhe a largura */
.hero__full {
  display: block;
  width: 100%;
  aspect-ratio: 1672 / 941;
  max-height: max(440px, 74vh);
  background: url('/assets/img/BannerDispa.jpg') 50% 0 / cover no-repeat;
}
.hero__compact {
  display: none;
}
@keyframes ds-pan {
  from {
    background-position: 0% 100%;
  }
  to {
    background-position: 100% 100%;
  }
}

/* ---------- 3) Painéis ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.grid > [hidden],
.s-side > [hidden] {
  display: none;
}
.s-orb {
  grid-column: span 5;
}
.s-bub {
  grid-column: span 7;
}
/* Radar em largura total (precisa de espaço para os rótulos); Continuar e Bloco rápido lado a lado logo abaixo */
.s-rad {
  grid-column: 1 / -1;
}
.s-side {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.s-side--solo {
  grid-template-columns: 1fr; /* "Continuar" foi para a margem do banner: o Bloco rápido ocupa a linha toda */
}
.s-side .cut {
  min-width: 0;
}
.s-side .notes {
  min-height: 178px;
}

/* Tanque */
.orbwrap {
  display: grid;
  grid-template-columns: minmax(180px, 250px) 1fr;
  gap: 22px;
  align-items: center;
}
.orb {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
}
.orb svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.w1 {
  animation: ds-wave 7s linear infinite;
}
.w2 {
  animation: ds-wave 11s linear infinite reverse;
}
@keyframes ds-wave {
  to {
    transform: translateX(-100px);
  }
}
.orb__c {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}
.orb__c b {
  display: block;
  font-size: 1.9rem;
  letter-spacing: -1px;
  color: var(--ink);
}
.orb__c small {
  font: 700 0.58rem var(--mono);
  letter-spacing: 1.4px;
  color: var(--muted);
  text-transform: uppercase;
}
.facts {
  display: grid;
  gap: 12px;
}
.fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 9px;
  gap: 10px;
}
.fact--solto {
  border: 0;
  padding: 0;
}
.fact small {
  font: 700 0.6rem var(--mono);
  letter-spacing: 1.2px;
  color: var(--muted);
  text-transform: uppercase;
}
.fact b {
  font-size: 1.15rem;
  letter-spacing: -0.4px;
}
.bar {
  height: 5px;
  background: var(--line);
  margin-top: 4px;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--red-l);
  transition: width 1.1s var(--ease);
}

/* Cardume */
.field {
  position: relative;
  height: 370px;
  overflow: hidden;
  border: 1px dashed var(--line2);
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 46px;
}
.bub {
  position: absolute;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  border: 0;
  padding: 0;
  box-shadow: 0 0 0 1px var(--line2), 0 10px 26px var(--shadow), inset 0 -8px 16px rgba(0, 0, 0, 0.1);
  animation: ds-float 7s ease-in-out infinite;
  animation-delay: var(--dl);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.bub:hover,
.bub:focus-visible,
.bub.on {
  transform: scale(1.07);
  box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px var(--red-l), 0 14px 38px var(--shadow);
  z-index: 3;
  animation-play-state: paused;
}
@keyframes ds-float {
  50% {
    translate: 0 -7px;
  }
}
.bub span {
  font: 700 0.62rem var(--mono);
  line-height: 1.15;
  pointer-events: none;
}
.bub span em {
  display: block;
  font-style: normal;
  font-weight: 600;
  opacity: 0.8;
  font-size: 0.56rem;
}
.readout {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line2);
  min-height: 66px;
}
.readout small {
  font: 700 0.56rem var(--mono);
  letter-spacing: 1.3px;
  color: var(--muted);
  text-transform: uppercase;
}
.readout b {
  display: block;
  font-size: 0.86rem;
  margin-top: 3px;
}
.readout strong {
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}
.readout .rb {
  flex: 1;
  min-width: 140px;
}
.readout .rb .mono {
  font-size: 0.64rem;
  color: var(--muted);
}
.legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font: 0.6rem var(--mono);
  color: var(--muted);
  letter-spacing: 0.6px;
  flex-wrap: wrap;
}
.legend .grad {
  width: 120px;
  height: 7px;
  background: linear-gradient(90deg, rgb(var(--bub0)), #be161e);
  border: 1px solid var(--line2);
}
.legend__dica {
  margin-left: auto;
}

/* Radar */
.radar {
  position: relative;
  height: 250px;
  overflow-x: auto;
  overflow-y: hidden;
}
.radar__in {
  position: relative;
  height: 100%;
  min-width: 680px;
}
.axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px;
  height: 1px;
  background: var(--line2);
}
.tick {
  position: absolute;
  bottom: 44px;
  width: 1px;
  height: 6px;
  background: var(--line2);
}
.dlab {
  position: absolute;
  bottom: 10px;
  transform: translateX(-50%);
  font: 0.58rem var(--mono);
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
  padding: 4px 5px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition: 0.15s;
}
.dlab:hover {
  border-color: var(--line2);
  color: var(--ink);
}
.dlab.sel {
  border-color: var(--red-l);
  color: var(--red-l);
  font-weight: 700;
}
.dlab.we {
  opacity: 0.5;
}
.dlab.today {
  color: var(--red-l);
  font-weight: 700;
}
.wk {
  position: absolute;
  bottom: 44px;
  top: 0;
  background: repeating-linear-gradient(135deg, var(--line2) 0 1px, transparent 1px 6px);
  opacity: 0.35;
}
.now {
  position: absolute;
  bottom: 44px;
  top: 6px;
  width: 1px;
  background: var(--red-l);
}
.now::after {
  content: 'HOJE';
  position: absolute;
  top: -2px;
  left: 6px;
  font: 700 0.56rem var(--mono);
  letter-spacing: 1.4px;
  color: var(--red-l);
}
.now i {
  position: absolute;
  bottom: -4px;
  left: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red-l);
  animation: ds-ping 1.8s infinite;
}
@keyframes ds-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 38, 47, 0.6);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(224, 38, 47, 0);
  }
}
.flag {
  position: absolute;
  bottom: 44px;
  width: 1px;
  transition: opacity 0.25s;
  background: var(--c);
  cursor: pointer;
}
.flag::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: -3px;
  width: 7px;
  height: 7px;
  background: var(--c);
}
.flag span {
  z-index: 2; /* o rótulo fica na frente das hastes das outras bandeiras */
  position: absolute;
  top: -4px;
  left: 0;
  transform: translateY(-100%);
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 9px;
  background: var(--panel);
  border: 1px solid var(--c);
  font-size: 0.68rem;
  font-weight: 700;
  transition: 0.15s;
}
.flag:hover,
.flag.sel {
  z-index: 3;
}
.flag:hover span,
.flag.sel span {
  background: var(--c);
  color: #fff;
}
.flag.off {
  opacity: 0.12;
  pointer-events: none;
}
.rleg {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.rleg button {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 700 0.6rem var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 9px;
  border: 1px solid var(--line2);
  background: none;
  cursor: pointer;
}
.rleg button i {
  width: 8px;
  height: 8px;
  background: var(--c);
}
.rleg button.off {
  opacity: 0.4;
  text-decoration: line-through;
}
.dayinfo {
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line2);
  min-height: 64px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.dayinfo small {
  display: block;
  font: 700 0.56rem var(--mono);
  letter-spacing: 1.3px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.dayinfo ul {
  margin: 0;
  padding: 0;
}
.dayinfo li {
  list-style: none;
  display: flex;
  gap: 9px;
  align-items: baseline;
  padding: 2px 0;
}
.dayinfo li i {
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--c);
  transform: translateY(-1px);
}
.dayinfo li span {
  color: var(--muted);
}
.dayinfo a {
  color: inherit;
}
.agenda {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
.agenda li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.agenda .d {
  flex: none;
  width: 46px;
  text-align: center;
  font: 700 0.6rem var(--mono);
  color: var(--muted);
  line-height: 1.2;
}
.agenda .d b {
  display: block;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.agenda .t {
  border-left: 3px solid var(--c);
  padding-left: 11px;
  font-size: 0.84rem;
  font-weight: 600;
}
.agenda .t small {
  display: block;
  font: 0.62rem var(--mono);
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Fichas (Continuar) */
/* --n = nº de fichas (home.js). Para 4: 178 px fechado e 300 px aberto, como sempre foi; com mais fichas o leque cresce junto
   (fechado: 34 px de cada ficha à mostra; aberto: 74 px por ficha). */
.deck {
  --n: 4;
  position: relative;
  height: calc((var(--n) - 1) * 34px + 76px);
  margin-top: 6px;
  transition: height 0.45s var(--ease);
}
.deck:hover,
.deck:focus-within {
  height: calc((var(--n) - 1) * 74px + 78px);
}
.fc {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 68px;
  padding: 12px 15px;
  background: var(--panel);
  border: 1px solid var(--line2);
  transition: transform 0.45s var(--ease), box-shadow 0.3s;
  color: inherit;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
/* até 8 fichas: cada uma 34 px mais baixa que a anterior, a de cima na frente */
.fc:nth-child(1) { top: 0; z-index: 8; }
.fc:nth-child(2) { top: 34px; z-index: 7; }
.fc:nth-child(3) { top: 68px; z-index: 6; }
.fc:nth-child(4) { top: 102px; z-index: 5; }
.fc:nth-child(5) { top: 136px; z-index: 4; }
.fc:nth-child(6) { top: 170px; z-index: 3; }
.fc:nth-child(7) { top: 204px; z-index: 2; }
.fc:nth-child(8) { top: 238px; z-index: 1; }
/* aberto: cada ficha desce mais 40 px que a anterior */
.deck:hover .fc:nth-child(2), .deck:focus-within .fc:nth-child(2) { transform: translateY(40px); }
.deck:hover .fc:nth-child(3), .deck:focus-within .fc:nth-child(3) { transform: translateY(80px); }
.deck:hover .fc:nth-child(4), .deck:focus-within .fc:nth-child(4) { transform: translateY(120px); }
.deck:hover .fc:nth-child(5), .deck:focus-within .fc:nth-child(5) { transform: translateY(160px); }
.deck:hover .fc:nth-child(6), .deck:focus-within .fc:nth-child(6) { transform: translateY(200px); }
.deck:hover .fc:nth-child(7), .deck:focus-within .fc:nth-child(7) { transform: translateY(240px); }
.deck:hover .fc:nth-child(8), .deck:focus-within .fc:nth-child(8) { transform: translateY(280px); }
.fc:hover {
  border-color: var(--red-l);
}
.fc .ic {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: rgba(224, 38, 47, 0.1);
  color: var(--red-l);
}
.fc div {
  min-width: 0;
}
.fc b {
  display: block;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fc small {
  font-size: 0.68rem;
  color: var(--muted);
}
.fc time {
  margin-left: auto;
  font: 0.6rem var(--mono);
  color: var(--muted);
  flex: none;
}
.deck__vazio {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  padding: 6px 0;
}

/* Bloco rápido */
.notes {
  width: 100%;
  height: 100%;
  min-height: 96px;
  resize: none;
  background: repeating-linear-gradient(transparent 0 25px, var(--line) 25px 26px);
  border: 0;
  outline: 0;
  color: var(--ink);
  font: 500 0.84rem/26px 'Montserrat', 'Segoe UI', sans-serif;
  padding: 0;
}
.notes::placeholder {
  color: var(--muted);
}

/* ---------- Guia de telas (recolhível) ---------- */
.guia {
  margin-top: 22px;
  border: 1px solid var(--line2);
  background: transparent;
}
.guia > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  cursor: pointer;
  list-style: none;
}
.guia > summary::-webkit-details-marker {
  display: none;
}
.guia__no {
  font: 700 0.66rem var(--mono);
  color: var(--red-l);
  letter-spacing: 1px;
}
.guia__t {
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 800;
}
.guia__tag {
  margin-left: auto;
  font: 700 0.58rem var(--mono);
  letter-spacing: 1.2px;
  color: var(--muted);
  border: 1px solid var(--line2);
  padding: 3px 8px;
}
.guia[open] > summary {
  border-bottom: 1px dashed var(--line2);
}
.guia__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 18px 22px 22px;
}
.guia-card {
  --c: 14px;
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 16px 18px;
  border: 1px solid var(--line2);
  background: var(--panel);
  clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
  transition: border-color 0.2s var(--ease), transform 0.25s var(--ease);
}
.guia-card[hidden] {
  display: none;
}
.guia-card:hover {
  border-color: var(--red-l);
  transform: translateY(-2px);
}
.guia-card svg {
  color: var(--red-l);
}
.guia-card b {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.92rem;
}
.guia-card p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .s-orb,
  .s-bub,
  .s-rad,
  .s-side {
    grid-column: 1 / -1;
  }
  .orbwrap {
    grid-template-columns: minmax(160px, 220px) 1fr;
  }
}

@media (max-width: 760px) {
  .s-side {
    grid-template-columns: 1fr;
  }
}

/* Celular: o título da imagem ficaria pequeno e os rostos minúsculos — vira texto de verdade
   + faixa só com os rostos, que rola devagar de lado a lado */
@media (max-width: 640px) {
  .hero__full {
    display: none;
  }
  .hero__compact {
    display: flex;
    flex-direction: column;
  }
  .hero {
    background: var(--panel);
    --c: 22px;
  }
  .hero__txt {
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--ink);
  }
  .hero__txt small {
    font: 700 0.6rem var(--mono);
    letter-spacing: 0.16em;
    color: var(--red-l);
    text-transform: uppercase;
  }
  .hero__txt h2 {
    margin: 0;
    font-size: clamp(1.7rem, 8vw, 2.4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 800;
  }
  .hero__txt h2 em {
    font-style: normal;
    color: var(--red-l);
    display: block;
  }
  .hero__art {
    height: 230px;
    background: url('/assets/img/BannerDispa.jpg') 0% 100% / auto 132% no-repeat;
    animation: ds-pan 36s ease-in-out infinite alternate;
  }
  .orbwrap {
    grid-template-columns: 1fr;
  }
  .orb {
    max-width: 240px;
    margin: 0 auto;
  }
  .field {
    height: 340px;
  }
  .radar,
  .rleg {
    display: none;
  }
  .agenda {
    display: block;
  }
  .legend__dica {
    margin-left: 0;
  }
}
