:root { color-scheme: light dark; }

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  line-height: 1.6;
  color: #1d1d1f;
  background: #fbfbfd;
}

@media (prefers-color-scheme: dark) {
  body { color: #f5f5f7; background: #000; }
  .muted-bg { background: #1c1c1e; }
  hr { border-color: rgba(255, 255, 255, 0.1); }
}

a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a { color: #0a84ff; } }

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
@media (prefers-color-scheme: dark) {
  header.site { border-bottom-color: rgba(255, 255, 255, 0.1); }
}
header.site .brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: inherit;
}
header.site .brand:hover { text-decoration: none; opacity: 0.7; }
header.site nav a {
  margin-left: 1.25rem;
  font-size: 0.95rem;
}

h1 {
  font-size: 2.5rem;
  margin: 0.5rem 0;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.1rem;
  margin: 0;
}

.lede {
  font-size: 1.1rem;
  color: #515154;
  margin-top: 0;
  margin-bottom: 2rem;
}
@media (prefers-color-scheme: dark) {
  .lede { color: #aeaeb2; }
}

.muted { color: #86868b; }
.small { font-size: 0.875rem; color: #86868b; }

ul.feature-list {
  list-style: none;
  padding: 0;
}
ul.feature-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}
ul.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #34c759;
  font-weight: 600;
}

/* App grid on homepage */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.app-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: #1d1d1f;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.app-card h3 { color: #1d1d1f; }
.app-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}
.app-card .icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
  background: #e5e5ea;
  background-size: cover;
  background-position: center;
}
@media (prefers-color-scheme: dark) {
  .app-card .icon { background-color: #2c2c2e; }
}
.app-card .body { flex: 1; min-width: 0; }
.app-card h3 { margin-bottom: 0.25rem; }
.app-card .desc {
  font-size: 0.9rem;
  color: #86868b;
  margin: 0;
}
.app-card .status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.5rem;
  background: rgba(0, 122, 255, 0.12);
  color: #0066cc;
}
.app-card .status.released {
  background: rgba(52, 199, 89, 0.15);
  color: #248a3d;
}
.app-card .status.review {
  background: rgba(255, 149, 0, 0.15);
  color: #b25500;
}
.app-card .status.beta {
  background: rgba(175, 82, 222, 0.15);
  color: #8e3aaf;
}
.app-card .status.dev {
  background: rgba(142, 142, 147, 0.18);
  color: #6e6e73;
}
@media (prefers-color-scheme: dark) {
  .app-card .status { background: rgba(10, 132, 255, 0.18); color: #5ac8fa; }
  .app-card .status.released { background: rgba(48, 209, 88, 0.18); color: #30d158; }
  .app-card .status.review { background: rgba(255, 159, 10, 0.18); color: #ff9f0a; }
  .app-card .status.beta { background: rgba(191, 90, 242, 0.18); color: #bf5af2; }
  .app-card .status.dev { background: rgba(174, 174, 178, 0.2); color: #aeaeb2; }
}

/* App page hero */
.app-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0 1rem;
}
.app-hero .icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: #e5e5ea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
@media (prefers-color-scheme: dark) {
  .app-hero .icon { background-color: #2c2c2e; }
}
.app-hero .meta { flex: 1; min-width: 0; }
.app-hero h1 { margin: 0 0 0.25rem; }
.app-hero .platforms {
  font-size: 0.9rem;
  color: #86868b;
}

.button {
  display: inline-block;
  background: #0066cc;
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 0.5rem;
}
.button:hover { background: #0a84ff; text-decoration: none; }
.button.secondary {
  background: transparent;
  color: #0066cc;
  border: 1px solid currentColor;
}
.button.secondary:hover { background: rgba(0, 102, 204, 0.08); }

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.875rem;
  color: #86868b;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (prefers-color-scheme: dark) {
  footer.site { border-top-color: rgba(255, 255, 255, 0.1); }
}
footer.site a { color: inherit; }

hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 2rem 0;
}

/* Cards keep a light look in both color schemes (designed against dark page bg) */
.app-card .desc { color: #515154; }
@media (prefers-color-scheme: dark) {
  .app-hero .icon { background-color: #2c2c2e; }
}
