/* reset default page margins */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #ffffff;
  color: #222;
  line-height: 1.5;
}

/* center content with max-width and padding */
.container {
  max-width: 720px; /* tight, readable width for text */
  margin: 0 auto;
  padding: 16px; /* mobile-first tight gutters */
  text-align: center;
}
/* Ultra-small phones: micro gutters */
@media (max-width: 360px) {
  .container { padding-left: 12px; padding-right: 12px; }
}

/* subtle section note divider */
.section-note {
  margin: 0.25rem 0 0.75rem 0;
  color: #666;
  font-style: italic;
  font-size: 0.95rem;
}

/* Heading spacing */
h1 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.5rem;
}

@media (min-width: 600px) {
  .container { padding-left: 20px; padding-right: 20px; padding-top: 20px; padding-bottom: 20px; }
  h1 { font-size: 2rem; }
}
@media (min-width: 1200px) {
  .container { padding-left: 24px; padding-right: 24px; }
}

nav {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0.5em;
  display: flex;
  justify-content: center;
  gap: 1.5em;
  font-size: 0.9rem;
  position: relative; /* allow left-aligned brand */
  padding-left: 3.25rem; /* space for logo so links stay centered */
  padding-right: 3.25rem; /* mirror left padding for symmetry */
}
nav a { color: #0066cc; text-decoration: none; }
nav a[aria-current="page"] { font-weight: normal; text-decoration: none; }

/* Header brand logo */
.brand { display: inline-flex; align-items: center; position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); }
.logo { width: 24px; height: 24px; border-radius: 4px; display: block; }

/* --- Apps layout & cards --- */
.apps {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  justify-content: center;
  justify-items: center; /* center cards within their grid tracks */
}
@media (min-width: 700px) {
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.app-card {
  display: flex;
  align-items: flex-start; /* top-align icon and text so titles line up */
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  text-align: left;
  box-sizing: border-box;
  height: auto; /* size to content height */
  width: auto;  /* size to content width */
  max-width: 100%; /* allow shrinking on narrow viewports */
  flex: 0 0 auto; /* do not stretch; allows equalize helper to set width */
}

/* App icon embed box */
.icon-embed {
  position: relative;
  width: 132px;
  height: 132px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
  border-radius: 22%;
}

.app-body { flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-start; }
.app-name { margin: 0 0 0.5rem 0; font-size: 1.125rem; }
.app-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.badge { display: inline-flex; align-items: center; line-height: 0; }
.badge img { height: 44px; display: block; } /* unify App Store and Google Play badge height */
/* Slight visual nudge: Google Play badge has larger safe-area padding */
.badge--android img { height: 46px; }

/* Product page bits */
.app-hero { border-radius: 22%; }
.cta { margin-top: 1rem; }
