* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  min-height: 100%;
  background: #0b0e12;
  color: #e8eaed;
  font-family: system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { display: flex; flex-direction: column; min-height: 100vh; }

/* --- Top bar --- */
#topbar {
  display: flex; align-items: baseline; gap: 12px;
  padding: 16px 24px;
  background: #12161c; border-bottom: 1px solid #262c33;
}
#brand { font-weight: 700; font-size: 20px; letter-spacing: .4px; color: #8ab4f8; }
#tagline { font-size: 13px; color: #9aa0a6; }
#link-note { margin-left: auto; font-size: 12px; color: #6d747c; }
#link-note.warn { color: #e0a548; }

/* --- Main --- */
#main { flex: 1; max-width: 1100px; width: 100%; margin: 0 auto; padding: 28px 24px 48px; }
#intro { color: #9aa0a6; font-size: 14px; line-height: 1.6; max-width: 640px; margin-bottom: 26px; }
#loading { color: #6d747c; font-size: 14px; }

#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* --- Card --- */
.card {
  display: flex; flex-direction: column;
  background: #12161c;
  border: 1px solid #262c33;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.card.live { cursor: pointer; }
.card.live:hover { border-color: var(--accent, #4d7fc4); transform: translateY(-2px); }
.card.disabled { opacity: .82; }

.card-head {
  position: relative;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #20262e;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent, #4d7fc4) 16%, transparent), transparent 60%),
    #151a21;
}
.card-title { font-size: 17px; font-weight: 650; margin-bottom: 3px; padding-right: 96px; line-height: 1.3; }
.card-sub { font-size: 12.5px; color: #9aa0a6; }

.badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px;
}
.badge.live { background: rgba(123,216,143,.16); color: #7bd88f; border: 1px solid rgba(123,216,143,.35); }
.badge.loaded { background: rgba(138,180,248,.16); color: #8ab4f8; border: 1px solid rgba(138,180,248,.35); }
.badge.processing { background: rgba(224,165,72,.14); color: #e0a548; border: 1px solid rgba(224,165,72,.32); }
.badge .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; margin-right: 5px; vertical-align: middle;
}
.badge.live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.card-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.desc { font-size: 13px; line-height: 1.6; color: #c3c8ce; }

/* stats */
.stats { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 12.5px; }
.stats dt { color: #7d858e; white-space: nowrap; }
.stats dd { color: #d7dbe0; }

/* work done */
.work-title { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #7d858e; margin-bottom: 7px; }
.work { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.work li { position: relative; padding-left: 18px; font-size: 12.5px; line-height: 1.45; color: #c3c8ce; }
.work li::before { content: "✓"; position: absolute; left: 0; color: var(--accent, #7bd88f); font-weight: 700; }
.card.processing .work li::before { content: "•"; color: #6d747c; }

/* capture line */
.capture { font-size: 11.5px; color: #7d858e; line-height: 1.55; }
.capture b { color: #9aa0a6; font-weight: 600; }

/* footer action */
.card-foot { padding: 14px 18px; border-top: 1px solid #20262e; }
.open-btn {
  display: block; width: 100%; text-align: center;
  padding: 9px 14px; border-radius: 6px; font-size: 13.5px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.open-btn.enabled { background: #2b4a75; border-color: #4d7fc4; color: #eaf1fb; }
.open-btn.enabled:hover { background: #33578a; }
.open-btn.muted { background: #171c23; border-color: #2a313a; color: #6d747c; cursor: not-allowed; }

#footer {
  padding: 14px 24px; font-size: 11.5px; color: #6d747c;
  border-top: 1px solid #262c33; background: #0e1217;
}

@media (max-width: 520px) {
  #grid { grid-template-columns: 1fr; }
  #topbar { flex-wrap: wrap; }
  #link-note { margin-left: 0; width: 100%; }
}
