/* Apps page. Dark like the #ai section, filter pill styling for buttons. */
body.apps-page {
  background: #030303;
  color: rgba(255, 255, 255, 0.9);
}
/* The shared light texture and white sweep would grey out the dark page. */
body.apps-page::before,
body.apps-page::after { display: none; }

.apps-main {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
  padding: clamp(96px, 12vw, 150px) 0 clamp(64px, 8vw, 110px);
}

.apps-hero {
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: center;
}

.apps-back {
  display: inline-block;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  text-decoration: none;
}
.apps-back::before { content: "\2190\00a0"; }
.apps-back:hover, .apps-back:focus-visible { color: #fff; }

.apps-hero h1 {
  margin: 10px 0 18px;
  color: #fff;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.apps-lede {
  margin: 0 auto;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.5;
}

.apps-unlock {
  margin: clamp(28px, 4vw, 40px) auto 0;
  max-width: 460px;
  text-align: left;
}
.apps-unlock label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.apps-unlock-row { display: flex; gap: 10px; }
.apps-unlock input {
  flex: 1 1 auto;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: #0c0c0f;
  color: #fff;
  font: inherit;
  font-size: 16px;
}
.apps-unlock input:focus { outline: none; border-color: #7c8bff; box-shadow: 0 0 0 1px #7c8bff; }

.apps-unlock button,
.app-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 26px;
  border: 1px solid #3d4fff;
  border-radius: 999px;
  background: radial-gradient(120% 220% at 0% 50%, #1b1f7a 0%, #161616 55%, #161616 100%);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}
.apps-unlock button:hover, .apps-unlock button:focus-visible,
.app-download:hover, .app-download:focus-visible {
  border-color: #7c8bff;
  box-shadow: 0 0 0 1px #7c8bff, 0 0 20px rgba(61, 79, 255, 0.5);
  outline: none;
}
.apps-unlock button:disabled { opacity: 0.6; cursor: progress; }

.apps-unlock-status { min-height: 22px; margin: 10px 4px 0; font-size: 14px; color: rgba(255, 255, 255, 0.62); }
.apps-unlock-status.is-ok { color: #7fe0a5; }
.apps-unlock-status.is-error { color: #ff8a8a; }

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}

.app-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #0b0b0e;
}

.app-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111116;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.app-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.app-body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 20px 20px 22px; text-align: left; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-head h2 { margin: 0; color: #fff; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; }

.app-chip {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.app-chip-ready { color: #7fe0a5; background: rgba(127, 224, 165, 0.1); border: 1px solid rgba(127, 224, 165, 0.3); }
.app-chip-setup { color: #ffd27f; background: rgba(255, 210, 127, 0.1); border: 1px solid rgba(255, 210, 127, 0.3); }

.app-tagline { margin: 8px 0 0; color: rgba(255, 255, 255, 0.86); font-size: 15px; font-weight: 600; }
.app-desc { margin: 8px 0 0; color: rgba(255, 255, 255, 0.6); font-size: 14px; line-height: 1.5; }
.app-needs { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(255, 210, 127, 0.07); color: rgba(255, 255, 255, 0.72); font-size: 13px; line-height: 1.45; }
.app-needs strong { color: #ffd27f; font-weight: 600; }
.app-meta { margin: 14px 0 16px; color: rgba(255, 255, 255, 0.45); font-size: 12.5px; }

.app-download { margin-top: auto; align-self: flex-start; height: 44px; padding: 0 22px; font-size: 14px; }
.app-download.is-locked { border-color: rgba(255, 255, 255, 0.2); background: #141417; color: rgba(255, 255, 255, 0.7); }
.app-download.is-locked::before {
  content: "";
  width: 12px;
  height: 12px;
  margin-right: 8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 5V3.6a3 3 0 0 1 6 0V5h.5c.6 0 1 .4 1 1v4.5c0 .6-.4 1-1 1h-7c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1H3zm1.3 0h3.4V3.6a1.7 1.7 0 0 0-3.4 0V5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 5V3.6a3 3 0 0 1 6 0V5h.5c.6 0 1 .4 1 1v4.5c0 .6-.4 1-1 1h-7c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1H3zm1.3 0h3.4V3.6a1.7 1.7 0 0 0-3.4 0V5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.apps-help {
  max-width: 760px;
  margin: clamp(56px, 8vw, 96px) auto 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #0b0b0e;
}
.apps-help h2 { margin: 0 0 14px; color: #fff; font-size: 22px; }
.apps-help ol { margin: 0; padding-left: 20px; color: rgba(255, 255, 255, 0.72); font-size: 15px; line-height: 1.6; }
.apps-help li + li { margin-top: 8px; }
.apps-help-note { margin: 16px 0 0; color: rgba(255, 255, 255, 0.5); font-size: 13px; }

body.apps-page .site-footer-simple { background: #030303; color: rgba(255, 255, 255, 0.55); border-top: 1px solid rgba(255, 255, 255, 0.08); }
body.apps-page .site-footer-simple a { color: rgba(255, 255, 255, 0.8); }

@media (max-width: 980px) { .apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .apps-grid { grid-template-columns: minmax(0, 1fr); }
  .apps-unlock-row { flex-direction: column; }
  .apps-unlock button { width: 100%; }
}

/* The homepage band in #ai that links here is styled inline in /index.html (.ai-apps). */
