/* Site pages share one width. Hosted Math Flu uses the wider analysis shell so FoF lines up with Analysis and Fluency. Quiz content stays narrower. */
:root { --fof-content-width: 1320px; --fof-gutter: 16px; --fof-header-height: 68px; }
html { scrollbar-gutter: stable; }
.fof-mark { position: relative; flex: 0 0 auto; font: 700 18px/1.5 system-ui, sans-serif; }
.fof-mark .fof-home { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; font: 700 18px/1.5 system-ui, sans-serif; color: var(--color-muted, #5a6b65); text-decoration: none; letter-spacing: -.06em; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.fof-mark a:focus-visible { outline: 3px solid #d69b00; outline-offset: 2px; }
.fof-destinations { position: absolute; z-index: 1000; top: calc(100% + 8px); left: 0; width: 190px; padding: 8px; border: 1px solid #d8e3de; border-radius: 12px; box-shadow: 0 8px 24px #1a2e2826; background: white; }
.fof-destinations[hidden] { display: none !important; }
.fof-destinations a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 6px; color: #1a2e28; text-decoration: none; font-size: 15px; font-weight: 500; }
.fof-destinations a:hover { background: #eef6f2; }
.fof-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fof-header, body.mk-app .fof-header {
  box-sizing: border-box; display: block; height: var(--fof-header-height); min-height: var(--fof-header-height);
  margin: 0; padding: 0; border: 0; background: white; font-family: system-ui, sans-serif;
}
.fof-header-inner { box-sizing: border-box; width: min(calc(100% - 2 * var(--fof-gutter)), var(--fof-content-width)); height: 100%; margin-inline: auto; display: flex; align-items: center; gap: 16px; }
.fof-header .site-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 16px; margin-left: auto; min-width: 0; overflow-x: auto; }
.fof-header .site-nav a { display: flex; align-items: center; min-height: 44px; flex-shrink: 0; white-space: nowrap; }
.fof-applet { --applet-height: calc(100dvh - var(--fof-header-height)); }
.fof-app-header .mk-brand { display: inline-flex; align-items: center; flex-shrink: 0; gap: 10px; text-decoration: none; color: #182c49; }
.fof-app-header .mk-brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #225de5; color: white; font-size: 28px; transform: rotate(-7deg); }
.fof-app-header .mk-brand-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.06em; }
.fof-app-header .mk-brand-name span { color: #225de5; }
.fof-app-header .mk-nav, #hosted-site-header .mk-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; }
.fof-app-header .mk-nav a, #hosted-site-header .mk-nav :is(a, button, span) { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; color: #5d6d83; white-space: nowrap; }
.fof-app-header .mk-nav [aria-current="page"] { background: #eaf0ff; color: #225de5; }
/* Quiz, Analysis, and Fluency share this header width. Quiz content stays in its narrower wrap. */
body.mk-app .fof-header-inner { width: min(calc(100% - 2 * var(--fof-gutter)), max(1368px, 80%)); max-width: max(1368px, 80%); }
body.mk-app .mk-page { width: min(calc(100% - 2 * var(--fof-gutter)), max(1368px, 80%)); max-width: max(1368px, 80%); padding-left: 0; padding-right: 0; margin-inline: auto; }
.fof-quiz-intro { text-align: center; padding: 20px var(--fof-gutter) 0; }
.fof-quiz-intro .mk-banner-tagline { position: static; transform: none; max-width: none; margin: 0; }
body.in-quiz .fof-quiz-intro, body.in-quiz #hosted-site-header { display: none; }
@media (max-width: 700px) {
  .fof-header-inner { gap: 8px; }
  .fof-header .site-nav { gap: 12px; font-size: 13px; }
  .fof-app-header .mk-brand-name, #hosted-site-header .mk-brand-name { display: none; }
  .fof-app-header .mk-nav a, #hosted-site-header .mk-nav :is(a, button, span) { padding: 8px; font-size: 13px; }
  .fof-app-header .mk-brand-mark, #hosted-site-header .mk-brand-mark { width: 30px; height: 30px; font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .learn-tool .card { transition: none; } }
