* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #fafafa;
  --color-text: #1a1a1a;
  --color-text-secondary: #666;
  --color-accent: #007aff;
  --color-accent-hover: #0056b3;
  --color-border: #e5e5e5;
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Landing Page */
.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
  text-align: center;
}

.landing-content {
  max-width: 1000px;
}

.app-icon {
  width: 140px;
  height: 140px;
  border-radius: 31px;
  margin: 0 auto 2.5rem;
  display: block;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.headline {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.tagline {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
  line-height: 1.5;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-text);
  color: white;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-primary svg {
  width: 22px;
  height: 22px;
}

.coming-soon {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.features {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
  justify-content: center;
}

.feature {
  text-align: center;
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.feature-text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Hero Screenshot */
.hero-screenshot {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}

.hero-screenshot img {
  width: 100%;
  max-width: 900px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 5rem;
  text-align: left;
}

.feature-card {
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.footer-links {
  margin-top: 5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-divider {
  width: 4px;
  height: 4px;
  background: var(--color-border);
  border-radius: 50%;
}

/* Legal Pages */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.legal-header {
  margin-bottom: 3rem;
}

.legal-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.15s;
}

.legal-header .back-link:hover {
  color: var(--color-text);
}

.legal-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.legal-header .last-updated {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: #333;
}

.legal-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
  color: #333;
}

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

.legal-content a:hover {
  text-decoration: underline;
}

/* Support Page */
.support-intro {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.faq-list {
  margin-top: 1.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 0;
}

.faq-item summary {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 1.25rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--color-text-secondary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  padding-bottom: 1.25rem;
  color: #555;
  line-height: 1.65;
}

.tally-form-container {
  margin-top: 1.5rem;
  min-height: 400px;
}

.tally-form-container iframe {
  border: none;
}

/* Responsive */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .landing {
    padding: 2rem 1.5rem;
  }

  .headline {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .features {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .footer-divider {
    display: none;
  }

  .legal {
    padding: 2rem 1.5rem;
  }

  .legal-header h1 {
    font-size: 1.75rem;
  }
}

/* Download Page */
.download-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: white;
}

.download-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text);
}

.download-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.download-logo-text {
  font-weight: 600;
  font-size: 1rem;
}

.download-version {
  font-size: 0.7rem;
  background: var(--color-border);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--color-text-secondary);
}

.download-faq-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: background 0.15s;
}

.download-faq-link:hover {
  background: var(--color-border);
}

.download-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem;
  text-align: center;
  min-height: calc(100vh - 60px);
}

.download-headline {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 2rem;
}

.apple-logo::before {
  content: "\f8ff";
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.download-instructions {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.download-instructions em {
  font-style: italic;
}

.inline-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  border-radius: 4px;
  margin: 0 0.15rem;
}

.download-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
}

.download-card-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.download-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.download-card-requirement {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.download-card-meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 1.5rem;
}

.download-card-button {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.download-card-button:hover {
  background: rgba(0, 122, 255, 0.05);
  border-color: var(--color-accent);
}

.download-support {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 4rem;
}

.download-support a {
  color: var(--color-text);
  text-decoration: underline;
}

.download-support a:hover {
  color: var(--color-accent);
}

.download-footer {
  display: flex;
  gap: 1rem;
}

.download-footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-secondary);
  transition: color 0.15s, border-color 0.15s;
}

.download-footer a:hover {
  color: var(--color-text);
  border-color: var(--color-text-secondary);
}

.download-attribution {
  margin-top: 3rem;
  font-size: 0.8rem;
  color: #bbb;
}

.download-attribution a {
  color: #aaa;
  text-decoration: underline;
}

.download-attribution a:hover {
  color: var(--color-text-secondary);
}

@media (max-width: 640px) {
  .download-header {
    padding: 1rem 1.25rem;
  }

  .download-page {
    padding: 3rem 1.5rem;
  }

  .download-headline {
    font-size: 2.25rem;
  }

  .download-instructions {
    font-size: 1rem;
  }

  .download-card {
    padding: 2rem 2.5rem;
    width: 100%;
  }
}
