:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f5;
  color: #101820;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f6f5 46%, #ecefed 100%);
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar p {
  margin: 0 0 4px;
  color: #0a7b68;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.8rem);
  line-height: 0.95;
}

.topbar span {
  border: 1px solid #ccd5d0;
  border-radius: 999px;
  padding: 8px 12px;
  color: #375148;
  font-size: 0.8rem;
  font-weight: 800;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.site-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9dfdc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(16, 24, 32, 0.08);
}

.preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dfe7e3;
}

.preview iframe {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  pointer-events: none;
}

.preview-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  color: #101820;
}

.preview-fallback small {
  color: #c64d3c;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-fallback strong {
  overflow-wrap: anywhere;
  font-size: 1.15rem;
}

.card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 94px;
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 4px;
  font-size: 1.03rem;
  line-height: 1.2;
}

.card-body p {
  margin: 0;
  color: #617068;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.card-body a,
.card-body button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  background: #101820;
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.site-card.is-empty {
  border-style: dashed;
  background: #f8faf9;
  box-shadow: none;
}

.site-card.is-empty .preview {
  background:
    linear-gradient(135deg, rgba(10, 123, 104, 0.14), rgba(198, 77, 60, 0.12)),
    #eef3f0;
}

.site-card.is-empty .preview iframe {
  display: none;
}

.site-card.is-empty button {
  background: #d5ddd9;
  color: #63736b;
  cursor: default;
}

@media (max-width: 960px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 460px);
    padding-top: 18px;
  }

  .topbar {
    align-items: start;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card-body {
    min-height: 82px;
  }
}
