/* AllFunApps shared styles for app landing pages.
   Everything is scoped under .afa so the legacy run.css files (which set
   img{position:absolute}, 11px white body text, etc.) cannot leak in. */

.afa-head { padding: 16px 12px 6px; text-align: center; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.afa-head h1 { margin: 0; font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.2; color: #24313b; }
.afa-head .afa-tag { margin: 6px auto 0; max-width: 40em; font-size: clamp(.95rem, 3.4vw, 1.1rem); line-height: 1.45; color: #3d4a55; }

.afa {
  box-sizing: border-box;
  max-width: 820px;
  margin: 18px auto 32px;
  padding: 20px clamp(14px, 4vw, 32px) 26px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
  color: #26323b;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  text-align: left;
}
.afa *, .afa *::before, .afa *::after { box-sizing: border-box; }
.afa img { position: static; max-width: 100%; height: auto; display: block; }
.afa a { color: #0b62b0; }
.afa a:focus-visible, .afa-quick a:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
.afa h2 { margin: 26px 0 8px; font-size: 1.3rem; line-height: 1.3; color: #1c2830; }
.afa h2:first-of-type { margin-top: 10px; }
.afa h3 { margin: 16px 0 4px; font-size: 1.05rem; color: #1c2830; }
.afa p, .afa ul, .afa ol { margin: 0 0 12px; }
.afa ul, .afa ol { padding-left: 1.3em; }
.afa li { margin-bottom: 4px; }

/* Breadcrumbs */
.afa-crumbs { margin: 0 0 6px; font-size: .9rem; color: #5a6670; }
.afa .afa-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.afa-crumbs li { margin: 0; }
.afa-crumbs li + li::before { content: "\203A"; margin-right: 4px; color: #8a959e; }
.afa-crumbs a { color: #0b62b0; text-decoration: none; }
.afa-crumbs a:hover { text-decoration: underline; }

/* Big touch-friendly buttons shown under the scaled app menu on phones */
.afa-quick { display: none; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 14px auto 0; padding: 0 12px; max-width: 640px; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.afa-quick a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: 999px; background: #fff; color: #0b4f8c; font-size: 1rem; font-weight: 600; text-decoration: none; box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.afa-quick a.afa-primary { background: #e8590c; color: #fff; }
@media (max-width: 760px) { .afa-quick { display: flex; } }

/* Steps */
.afa .afa-steps { counter-reset: s; list-style: none; padding-left: 0; }
.afa-steps li { counter-increment: s; position: relative; padding-left: 40px; margin-bottom: 10px; }
.afa-steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%; background: #e8f1fb; color: #0b4f8c; font-weight: 700; text-align: center; line-height: 28px; }

/* FAQ */
.afa details { border-top: 1px solid #e3e8ec; padding: 10px 0; }
.afa details:last-of-type { border-bottom: 1px solid #e3e8ec; }
.afa summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.afa details p { margin: 8px 0 0; }

/* More games grid (shared include /inc/more-games.htm) */
.afa .afa-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 10px 0 0; padding: 0; list-style: none; }
.afa-more li { margin: 0; }
.afa-more a { display: block; height: 100%; padding: 8px; border: 1px solid #e3e8ec; border-radius: 10px; color: #1c2830; text-decoration: none; text-align: center; }
.afa-more a:hover { border-color: #0b62b0; box-shadow: 0 2px 8px rgba(11, 98, 176, .15); }
.afa-more img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.afa-more strong { display: block; font-size: .95rem; line-height: 1.3; }
.afa-more span { display: block; font-size: .8rem; color: #5a6670; }
/* Hide the card for the page you are already on */
body[data-app="countmoney"] .afa-more .g-countmoney,
body[data-app="mathflashcards"] .afa-more .g-mathflashcards,
body[data-app="statesandcapitals"] .afa-more .g-statesandcapitals,
body[data-app="worldcountries"] .afa-more .g-worldcountries,
body[data-app="uspresidents"] .afa-more .g-uspresidents { display: none; }

.afa-foot { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid #e3e8ec; font-size: .9rem; color: #5a6670; }
.afa-foot a { margin-right: 14px; display: inline-block; padding: 4px 0; }
