/* Home header + "Próxima operação" card. Font family and palette come from the published Home tokens. */
#main > .greeting {
  position: relative;
  margin: clamp(1.25rem, 2vw, 2rem) 0 clamp(1rem, 1.5vw, 1.375rem);
  padding: 0;
  min-width: 0;
}
/* Light scrim: keeps the copy readable over the photo without a dark block behind it. */
#main > .greeting::before {
  content: "";
  position: absolute;
  inset: -0.5rem -1.5rem -0.75rem;
  background: linear-gradient(90deg, #0004 0%, #0002 60%, #0000 100%);
  -webkit-mask: linear-gradient(180deg, #0000 0%, #000 25%, #000 70%, #0000 100%);
  mask: linear-gradient(180deg, #0000 0%, #000 25%, #000 70%, #0000 100%);
  pointer-events: none;
}
#main > .greeting .greeting-copy {
  position: relative;
  display: grid;
  gap: 0.625rem;
  width: 100%;
  max-width: 44rem;
  min-width: 0;
  min-height: 0;
}
#main > .greeting h1.greeting-context-title {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.875rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  text-shadow: 0 1px 8px #0006;
  animation: none;
}
#main > .greeting p.greeting-context-message {
  display: block;
  margin: 0;
  max-width: 34ch;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  overflow-wrap: anywhere;
  text-shadow: 0 1px 8px #0006;
}
#main > .greeting .hh-hello { color: var(--accent); }
/* While the step is decided: quiet placeholder bars instead of a sentence that would change. */
#main > .greeting .hh-skel {
  display: block;
  height: 0.9em;
  border-radius: 8px;
  background: linear-gradient(90deg, #ffffff10 0%, #ffffff1f 50%, #ffffff10 100%) 0 0 / 200% 100%;
  animation: hh-shimmer 1.4s ease-in-out infinite;
}
#main > .greeting .hh-skel-title { width: min(80%, 18rem); height: 1.1em; margin: 0.1em 0; }
#main > .greeting .hh-skel-line { width: min(65%, 15rem); height: 0.85em; margin-top: 0.3em; }
@keyframes hh-shimmer { to { background-position: -200% 0; } }
#main > .greeting .hh-w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(4px);
  animation: hh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#main > .greeting .hh-fade {
  opacity: 0;
  transform: translateY(6px);
  animation: hh-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes hh-rise { to { opacity: 1; transform: none; filter: none; } }

/* Card: tone dot, floating tinted chips, live count, one-time button effect. */
.hh-card .operation-top .dot.is-warn { background: #e7c66b; }
.hh-card .operation-top .dot.is-bad { background: #e9a08f; }
.hh-card .hh-count { display: block; font-weight: inherit; font-variant-numeric: tabular-nums; }
.hh-card .hh-fill {
  display: block;
  width: 7.5rem;
  height: 3px;
  margin-top: 5px;
  border-radius: 3px;
  background: #ffffff14;
  overflow: hidden;
}
.hh-card .hh-fill > i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transform-origin: left;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  animation: hh-grow 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
@keyframes hh-grow { from { transform: scaleX(0); } }
.hh-card .status-grid.hh-grid { border-top: 0; gap: 8px; }
.hh-card .hh-grid > .hh-chip {
  padding: 9px 4px;
  border: 1px solid #ffffff0d;
  border-radius: 12px;
  background: #ffffff08;
  box-shadow: 0 6px 14px -4px #000000b3, 0 2px 4px #00000059, inset 0 1px 0 #ffffff0a;
  min-width: 0;
  animation: hh-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(450ms + var(--i, 0) * 80ms);
  opacity: 0;
  transform: translateY(6px);
}
.hh-card .hh-grid > .hh-chip small { color: var(--muted); overflow-wrap: anywhere; }
.hh-card .hh-grid > .hh-chip.is-ok { background: #bacd831c; border-color: #bacd831f; }
.hh-card .hh-grid > .hh-chip.is-ok svg { color: var(--accent); }
.hh-card .hh-grid > .hh-chip.is-ok small { color: #d6e4a8; }
.hh-card .hh-grid > .hh-chip.is-pending { background: #e7c66b1c; border-color: #e7c66b1f; }
.hh-card .hh-grid > .hh-chip.is-pending svg,
.hh-card .hh-grid > .hh-chip.is-pending small { color: #e7c66b; }
.hh-card .hh-grid > .hh-chip.is-bad { background: #e9a08f1f; border-color: #e9a08f21; }
.hh-card .hh-grid > .hh-chip.is-bad svg,
.hh-card .hh-grid > .hh-chip.is-bad small { color: #e9a08f; }

/* Everything done: one quiet line instead of four chips. */
.hh-card .hh-allok {
  margin: 4px 0 22px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #bacd8314;
  color: #d6e4a8;
  font-size: 12.5px;
  animation: hh-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}
.hh-card .hh-faction { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.hh-card .hh-faction > span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff08;
  box-shadow: 0 6px 14px -6px #000b;
}
.hh-card .hh-faction b { font-size: 14px; font-weight: 600; }
.hh-card .hh-faction small { font-size: 11.5px; color: var(--muted); }
/* Discovery poster: cover, date badge and title over the photo. */
.hh-discover .hh-poster {
  position: relative;
  height: 150px;
  margin: 0 0 14px;
  border-radius: 14px;
  background: var(--raised) center / cover no-repeat;
  overflow: hidden;
  box-shadow: 0 10px 22px -8px #000d;
  animation: hh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}
.hh-discover .hh-date {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 46px;
  padding: 5px 0;
  border: 1px solid #ffffff1f;
  border-radius: 11px;
  background: #0d100ecc;
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}
.hh-discover .hh-date b { display: block; margin-bottom: 3px; font-size: 9px; letter-spacing: 1px; color: var(--accent); }
.hh-discover .hh-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 14px 11px;
  background: linear-gradient(180deg, #0000, #000c);
}
.hh-discover .hh-cap b { display: block; font-size: 19px; font-weight: 600; }
.hh-discover .hh-cap small { font-size: 12px; color: var(--muted); }
.hh-discover .hh-discover-meta { margin: 0 0 8px; }
.hh-discover .hh-facts { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); }

/* Ecosystem tracker: steps joined by a line that fills up to the current one. */
.hh-eco .ux17-op-title { margin-bottom: 6px; }
.hh-eco .hh-track { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); margin: 14px 0 22px; }
.hh-eco .hh-line { position: absolute; left: 12%; right: 12%; top: 8px; height: 3px; border-radius: 3px; background: #ffffff14; }
.hh-eco .hh-line > i {
  display: block;
  height: 100%;
  width: calc(var(--cur) / (var(--n) - 1) * 100%);
  border-radius: 3px;
  background: var(--accent);
  transform-origin: left;
  animation: hh-grow 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}
.hh-eco .hh-track > span { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.hh-eco .hh-track > span > i { width: 19px; height: 19px; border: 3px solid var(--surface); border-radius: 50%; background: #2a2d27; }
.hh-eco .hh-track > .is-ok > i { background: var(--accent); }
.hh-eco .hh-track > .is-ok { color: var(--text); }
.hh-eco .hh-track > .is-now > i { background: #e7c66b; animation: hh-pulse 1.4s ease-out 1s 3; }
.hh-eco .hh-track > .is-now { color: #e7c66b; font-weight: 600; }

.hh-card .hh-cta {
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: hh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}
.hh-card .hh-cta.is-warn { background: #e7c66b; color: #1b2110; }
.hh-card .hh-cta.is-bad { background: #e9a08f; color: #2a130d; }
.hh-card .hh-cta .hh-arrow { display: inline-flex; }
.hh-card .hh-a-shine::after,
.hh-card .hh-a-pop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, #ffffff8c 50%, transparent 70%);
  transform: translateX(-120%);
  animation: hh-shine 1s ease 1.35s forwards;
  pointer-events: none;
}
.hh-card .hh-a-pop::after { animation-delay: 1.6s; }
@keyframes hh-shine { to { transform: translateX(120%); } }
.hh-card .hh-a-pulse { animation: hh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards, hh-pulse 1.4s ease-out 1.35s 2; }
@keyframes hh-pulse { 0% { box-shadow: 0 0 0 0 #e7c66bb3; } 100% { box-shadow: 0 0 0 12px #e7c66b00; } }
.hh-card .hh-a-nudge { animation: hh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards, hh-nudge 0.55s ease 1.35s, hh-pulse-bad 1.4s ease-out 1.5s; }
@keyframes hh-nudge { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes hh-pulse-bad { 0% { box-shadow: 0 0 0 0 #e9a08fb3; } 100% { box-shadow: 0 0 0 12px #e9a08f00; } }
.hh-card .hh-a-pop { animation: hh-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards, hh-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.35s; }
@keyframes hh-pop { 40% { transform: scale(1.04); } }
.hh-card .hh-a-arrow .hh-arrow { animation: hh-arrow 0.7s ease-in-out 1.35s 3; }
@keyframes hh-arrow { 50% { transform: translate(5px, -5px); } }

@media (prefers-reduced-motion: reduce) {
  #main > .greeting .hh-w,
  #main > .greeting .hh-fade,
  #main > .greeting .hh-skel,
  .hh-card .hh-grid > .hh-chip,
  .hh-card .hh-cta,
  .hh-card .hh-cta::after,
  .hh-card .hh-arrow,
  .hh-card .hh-fill > i,
  .hh-card .hh-allok,
  .hh-discover .hh-poster {
    animation: none !important;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
