/* ─── main ─────────────────────────────────────────────────────────── */

.app-main { max-width: 1080px; margin: 0 auto; padding: 1.75rem 1.25rem; }

/* ─── flash ────────────────────────────────────────────────────────── */

.flash {
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  border: 1px solid;
}
.flash-notice {
  background: rgba(122, 217, 255, 0.10);
  color: var(--accent);
  border-color: var(--cyan-dim);
}
.flash-alert {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red);
}

/* ─── page header ──────────────────────────────────────────────────── */

.page-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.4rem; line-height: 1; letter-spacing: -0.025em;
  font-weight: 600;
}
.page-header .eyebrow { display: block; margin-bottom: 0.4rem; }

/* ─── filter bar ───────────────────────────────────────────────────── */

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 1rem; }

/* ─── archived / details ───────────────────────────────────────────── */

.archived-section { margin-top: 1.5rem; }
.archived-section summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
  padding: 0.4rem 0;
}
.archived-section summary:hover { color: var(--text); }
.archived-section .card-list { margin-top: 0.75rem; }

/* ─── grids for stats / cluster layouts ────────────────────────────── */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }

@media (max-width: 768px) {
  .app-main { padding: 0.85rem 0.75rem calc(0.85rem + env(safe-area-inset-bottom, 0)); }

  .page-header { flex-wrap: wrap; gap: 0.4rem 0.75rem; }
  .page-header h1 { font-size: 1.75rem; }

  .grid-stats { gap: 0.5rem; }
}
