/*
 * Are You Faster CIC: the app pages (/sentencewise, /disc-io, /personent, /last-mech and the pages under them).
 * One template for every app (tools/apps/build.mjs), on top of main.css and legal.css, so an app's
 * overview, support and policy pages look like the rest of areyoufaster.com.
 */

/* The app's own mark above a policy page's heading, linking back to its overview. */
.app-mark {
  align-items: center;
  color: var(--color-text-primary);
  display: inline-flex;
  font-weight: 600;
  gap: 0.625rem;
  margin-bottom: 1rem;
  text-decoration: none;
}
.app-mark img { border-radius: 22%; display: block; height: 40px; width: 40px; }
.app-mark:hover { color: var(--color-secondary); }
.app-mark:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 4px; border-radius: 6px; }

/* The overview page's opening: icon, name, what it is, where to get it. */
.app-hero .app-icon {
  border-radius: 22%;
  box-shadow: var(--shadow-md);
  display: block;
  height: 96px;
  margin: 0 auto 1.25rem;
  width: 96px;
}
.app-hero .app-lede {
  color: var(--color-text-primary);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.55;
  margin: 0 auto 1rem;
  max-width: 40rem;
}
.app-hero .app-meta {
  color: var(--color-text-secondary);
  margin: 0 auto;
  max-width: 40rem;
}

.app-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.app-badges a {
  border-radius: 10px;
  display: inline-flex;
  line-height: 0;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}
.app-badges a:hover { filter: brightness(1.08); transform: translateY(-1px); }
.app-badges a:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 3px; }
.app-badges img { display: block; height: 48px; width: auto; }
/* Google's badge file carries its own transparent margin; this sizes the visible badge to match Apple's. */
.app-badges .badge-google img { height: 70px; margin: -11px -10px; }

/* The same short menu on every page of an app. */
.app-nav { margin: -1.5rem auto 2.5rem; max-width: 900px; }
.app-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.app-nav a {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text-secondary);
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.4375rem 1rem;
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}
.app-nav a:hover { background: hsla(0, 0%, 100%, 0.05); color: var(--color-text-primary); }
.app-nav a[aria-current="page"] {
  background: linear-gradient(135deg, rgba(143, 95, 255, 0.28), rgba(25, 229, 255, 0.18));
  border-color: rgba(143, 95, 255, 0.5);
  color: var(--color-text-primary);
}
.app-nav a:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 2px; }

/* A short line a policy page shows under its date: which app, which versions. */
.app-applies { color: var(--color-text-secondary); font-size: 0.9375rem; margin-top: 0.5rem; }

/* Small print an app carries on every page (licences, "not legal advice"). */
.app-note {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 900px;
  padding: 0 2rem;
}
.app-note p + p { margin-top: 0.75rem; }

/* A where-it-applies tag inside a policy section. */
.legal-section .app-where {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-style: italic;
}

/* Every list in the app pages' running text keeps the legal layout's spacing. */
.legal-section .muted { color: var(--color-text-secondary); }

@media (max-width: 768px) {
  .app-nav { margin-top: -1rem; }
  .app-note { padding: 0 0.5rem; }
}
