@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .console-topline,
  .result-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions {
    align-items: center;
  }

  .login-stage,
  .search-form {
    grid-template-columns: 1fr;
  }

  .search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-form .wide,
  .search-form .cache-controls,
  .search-form .page-size-control,
  .search-form > button {
    grid-column: 1 / -1;
  }

  .search-form > #searchButton {
    grid-column: 1 / -1;
  }

  .platform-group-grid,
  .merchant-platforms .platform-group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .discovery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .login-card {
    position: static;
  }

  .login-card:not(.hidden) {
    order: -1;
  }

  .stat-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  .hero {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions {
    justify-content: space-between;
  }

  .search-form,
  .results {
    grid-template-columns: 1fr;
  }

  .platform-group-grid,
  .merchant-platforms .platform-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discovery-grid {
    grid-template-columns: 1fr;
  }

  .discovery-head {
    align-items: stretch;
    flex-direction: column;
  }

  .discovery-submit-row {
    justify-content: stretch;
  }

  .discovery-submit-row .compact-button {
    flex: 1 1 180px;
  }
}

@media (max-width: 460px) {
  .platform-group-grid,
  .merchant-platforms .platform-group-grid {
    grid-template-columns: 1fr;
  }
}


.page-dock {
  align-items: center;
  background: rgba(17, 24, 32, 0.96);
  border: 1px solid rgba(160, 186, 218, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  max-width: min(560px, calc(100% - 28px));
  margin: 18px auto 0;
  padding: 8px 8px 8px 16px;
  position: static;
  width: auto;
  min-width: min(520px, calc(100% - 28px));
  z-index: 20;
}

.page-dock .ghost {
  min-height: 44px;
  padding: 0 14px;
  border-color: rgba(102, 227, 255, 0.18);
  background: rgba(102, 227, 255, 0.08);
  color: #c9e9ff;
  box-shadow: none;
}

.page-dock .ghost:hover:not(:disabled) {
  background: rgba(102, 227, 255, 0.14);
  border-color: rgba(102, 227, 255, 0.28);
}

.dock-summary {
  color: rgba(199, 213, 231, 0.82);
  font-size: 13px;
  overflow: hidden;
  padding-left: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 24px, 1220px);
    padding-top: 22px;
  }

  .login-copy,
  .login-card,
  .search-form,
  .product {
    border-radius: var(--radius-lg);
  }

  .stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-strip div,
  .stat-strip div:first-child {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .stat-strip div:first-child {
    border-left: 0;
  }

  button {
    width: 100%;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions .signal-card {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .hero-actions #logoutButton,
  .hero-actions #accessLogoutButton {
    width: 100%;
  }

  .hero-actions #logoutButton.hidden + #accessLogoutButton {
    grid-column: 1 / -1;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .compact-button,
  .favorite-button,
  .source-state-button {
    min-height: 44px;
    width: auto;
  }

  .favorite-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .favorite-actions {
    justify-content: flex-end;
    width: 100%;
  }

  .favorite-actions .ghost,
  .favorite-open {
    max-width: 100%;
  }

  .favorite-title {
    white-space: normal;
  }

  .page-dock {
    align-items: center;
    border-radius: var(--radius-lg);
    min-width: calc(100% - 24px);
    padding: 9px 10px;
  }

  .dock-summary {
    padding: 0;
    white-space: normal;
  }

  .page-dock .ghost {
    flex: 0 0 auto;
    width: auto;
  }

}
