/* Alphasource mobile app pages — shared styles */
:root {
  color-scheme: light dark;
  --bg: #0f1117;
  --surface: #1a1d27;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --border: #27272a;
  --max-width: 720px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #18181b;
    --muted: #71717a;
    --border: #e4e4e7;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  flex: 1;
  width: 100%;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

p,
li {
  color: var(--muted);
}

.lead {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
}

.store-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  text-decoration: none;
}

.store-buttons a:hover {
  background: var(--accent-hover);
  color: white;
  text-decoration: none;
}

.store-buttons a.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

footer nav {
  justify-content: center;
  padding: 0 0 0.75rem;
  border: none;
  background: transparent;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose strong {
  color: var(--text);
}

.app-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.app-card {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  background: var(--surface);
}

.app-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--text);
}

.app-card p {
  margin: 0;
  font-size: 0.9375rem;
}

.app-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.app-card .links a {
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.meta {
  font-size: 0.875rem;
  color: var(--muted);
}

@media (max-width: 540px) {
  .nav-links {
    gap: 0.75rem;
    font-size: 0.875rem;
  }
}
